package com.sdx.console.finOrderChannel.service;

import java.util.List;

import org.beetl.sql.core.engine.PageQuery;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ibeetl.admin.core.util.PlatformException;

import com.sdx.console.finOrderChannel.dao.FinOrderChannelDao;
import com.sdx.console.finOrderChannel.entity.FinOrderChannel;
import com.ibeetl.admin.core.service.BaseService;

/**
 * 渠道产品 Service
 */

@Service
@Transactional
public class FinOrderChannelService extends BaseService<FinOrderChannel>{

    @Resource
	private FinOrderChannelDao finOrderChannelDao;

    public PageQuery<FinOrderChannel>queryByCondition(PageQuery query){
        PageQuery ret =  finOrderChannelDao.queryByCondition(query);
        queryListAfter(ret.getList());
        return ret;
    }

    public void batchDelFinOrderChannel(List<String> ids){
        try {
            finOrderChannelDao.batchDelFinOrderChannelByIds(ids);
        } catch (Exception e) {
            throw new PlatformException("批量删除渠道产品失败", e);
        }
    }

	public List<FinOrderChannel> all() {
		return finOrderChannelDao.all();
		}
}